package com.foxnicweb.app.patent.role;

import com.foxnicweb.app.constants.enums.patent.ProcessRoleType;
import org.github.foxnic.web.domain.hrm.Employee;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
public class OutPerson extends ProcessRole {

    private BusinessAssistant businessAssistant;
    public OutPerson() {
        super(ProcessRoleType.OUT_PERSON);
    }

    /**
     * 1、派案时选定商务助理，后续流程中涉及到的外协对接人默认为派案节点选定的商务助理。
     * */
    @Override
    public List<Employee> getMembers(Context context) {
        List<Employee> employees=super.getMembers(context);
        if(employees==null || employees.isEmpty()) {
            employees=businessAssistant.getMembers(context);
        }
        return employees;
    }



}
